package com.example.day1;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiServer {

    @POST("user/getToken")
    Observable<ResponseInfo<String>> login(@Body Map userEntity);

    //https://cloud.anylink.io:8443/agentList?token=b0c4b38c-28b1-442f-b6cb-16620321ebc1&page=2&perPage=10
    @GET("agentList")
    Observable<ResponseInfo<List<User>>> getAgenList(@Query("token") String token,
                                                     @Query("page") int page,
                                                     @Query("perPage") int perPage);

}
